<template>
  <div>
    <navigation></navigation>
    <div class="opinion">
      <div class="opinion-name">意见反馈</div>
      <div class="opinion-text">
        <el-input
          type="textarea"
          :rows="7"
          maxlength="1000"
          placeholder="请输入内容"
          v-model="textarea"
          show-word-limit
        >
        </el-input>
      </div>

      <div class="opinion-button">
        <input type="button" value="提交" @click="Submit" />
      </div>
    </div>
  </div>
</template>

<script>
import { createFeedback } from "../../network/usermes";

import Navigation from "../../components/navigation/navigation";
export default {
  name: "Opinion",
  components: {
    Navigation,
  },
  data() {
    return {
      textarea: "",
    };
  },

  methods: {
    Submit() {
      createFeedback(this.textarea, this.$Cookie.get("userid")).then((res) => {
        this.$router.push("/home");
        console.log(res);
      });
    },
  },
};
</script>

<style>
.opinion {
  width: 80%;
  margin: 0 auto;
}

.opinion-name {
  font-size: 0.15rem;
  margin-top: 0.5rem;
  margin-bottom: 0.2rem;
}

.opinion-text {
  width: 60%;
}

.opinion-button input {
  cursor: pointer;
  margin-top: 0.2rem;
  width: 1.2rem;
  height: 0.33rem;
  font-size: 0.11rem;
  font-weight: bold;
  color: #fff;
  border-radius: 0.05rem;
  background-color: rgb(36, 184, 242);
}
</style>